<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>文字列表</title>
    <link rel="stylesheet" href="../css/reset.css">
    <link rel="stylesheet" href="../css/text-list.css">
</head>
<body>
<div id="title">
    要闻速递
</div>
<div id="content">
    <ul class="simple-list">
        <script type="text/html" id="listTemp">
            {{each}}
            <li class="list-item {{$index===0 && 'active'}}" data-url="{{$imports.getListUrl($value)}}?id={{$value.id}}">
                <div class="icon">
                    {{if $value.genre==3}}
                        <img src="../images/text-list/sp.png" alt="">
                    {{else}}
                        <img src="../images/text-list/wz.png" alt="">
                    {{/if}}
                </div>
                <h3 class="title marquee">{{$value.titleName}}</h3>
                <span class="time">{{$value.createTime  |DateFormat 'yyyy-MM-dd'}}</span>
            </li>
            {{/each}}
        </script>
    </ul>
</div>
<div id="page"></div>

</body>
<script src="../js/S.js"></script>
<script src="../js/common.js"></script>
<script src="../js/tvProcess.js"></script>
<script src="../js/template-web.js"></script>
<script src="../js/list.js"></script>
<script>
    /**
     * DEMO测试数据正式环境请删除
     * 创建于幸福万源项目
     */
    tools.test('http://10.0.1.122:8080/CMSInterfaceManage/myServletControls.do?action=getMenusByFileJson&fname=configs/wanYuanSynthesize/wanYuanSynthesizeTVConfig.json');
    API.MACLogin("11-44-77",function (data) {
        if(data.status===1 ){
            LOGIN_TOKEN=data.datas[0].loginToken;
            LOGIN_DATA=data;
        }
    });

    keyopt.options.focusElm="listItem1";
    var menuId=tools.getUrlParam('menuId')||'12211535123250008';
    var title=tools.getUrlParam('title')||'美食特产';
    var id=tools.getUrlParam('id')||'12211629385600106';
    $('#title').text(title);
    var newsList = new List({
        action: 'getWanYuanContentList',
        tempId: 'listTemp',
        params: {
            menuId: menuId,
            pageSize: 8,
            pageIndex:tools.getSave('page')|| 0
        },
        callback: function (data) {
            tools.recoveryFocus();
            newsList.setListOnSubmit(function () {
                tools.saveFocus({page:newsList.def.currentPage-1})
            });
        }
    });
    newsList.setParams({stairColumnId: '1129132720190004'}).getData().addPageControl();

</script>
</html>